package com.stylefeng.guns.rest.modular.App.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("notice_inf")
@EqualsAndHashCode(callSuper=true)
 /**
 * 通知信息
 *
 * @author sasazaixian
 * @Date 2018-11-15 16:38
 * @TableField(exist = false) 实现属性与数据库字段不一一对应
 */
public class NoticeInf extends Model<NoticeInf> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     * 自动生成后修改成实际的主键 
     */
    @TableId(value = "ni_id", type = IdType.UUID)
    @ApiModelProperty(value = "主键")
    private String niId;     //主键
    @Override
    protected Serializable pkVal() {
        return this.niId;
    }
    
    //扩展能查询字段
    @TableField(exist = false) 
    private String key ;
    //开始日期
    @TableField(exist = false)     
    private String sdate;
    //截止日期 
    @TableField(exist = false) 
	private String edate;
    //排序字段
    @TableField(exist = false) 
	private String  sortField ;
	//排序	
	@TableField(exist = false) 
	private String sortOrder;
    //当前页码 从1 开始
    @TableField(exist = false)
    private Integer pageNum;
    //每页显示多少条
    @TableField(exist = false)
    private Integer pageSize;

    public void setKey(String key) {
		this.key = key;
	}
	public String getKey() {
		return key;
	}	
	public void setSortField(String sortField) {
		this.sortField = sortField;
	}
	public String getSortField() {
		return sortField;
	}
	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}
	public String getSortOrder() {
		return sortOrder;
	}
	public void setEdate(String edate) {
		this.edate = edate;
	}
	public String getEdate() {
		return edate;
	}
	public void setSdate(String sdate) {
		this.sdate = sdate;
	}
	public String getSdate() {
		return sdate;
	}	
	

    @ApiModelProperty(value = "标题")
    @TableField("ni_title")
    private String niTitle;     //标题

    @ApiModelProperty(value = "内容")
    @TableField("ni_content")
    private String niContent;     //内容

    @ApiModelProperty(value = "创建人")
    @TableField("create_user")
    private String createUser;     //创建人

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;     //创建时间

    @ApiModelProperty(value = "更新人")
    @TableField("update_user")
    private String updateUser;     //更新人

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;     //更新时间

    @ApiModelProperty(value = "状态0：起草中 1：发布 2取消")
    @TableField("ni_state")
    private String niState;     //状态0：起草中 1：发布 2取消

    @ApiModelProperty(value = "优先级 数字越小 级别越高 普通级别是10")
    @TableField("ni_level")
    private Integer niLevel;     //优先级 数字越小 级别越高 普通级别是10

    @ApiModelProperty(value = "优先级开始时间")
    @TableField("ni_level_start_date")
    private Date niLevelStartDate;     //优先级开始时间

    @ApiModelProperty(value = "优先级截止时间")
    @TableField("ni_level_end_date")
    private Date niLevelEndDate;     //优先级截止时间
}
